package com.hdu.point_offer;

public class lcr178 {
    class Solution {
        public int trainingPlan(int[] actions) {
            int ans = 0;
            for (int i = 0; i < 32; i++)
            {
                int curBit = 0;
                for (int j = 0; j < actions.length; j++)
                {
                    if ((actions[j] & (1 << i)) != 0)
                    {
                        curBit++;
                    }
                }
                if (curBit % 3 != 0)
                {
                    ans |= (1 << i);
                }
            }
            return ans;
        }
    }
}
